Skip to content

fix(web): fix KeyboardStub.validateForCustomKeyboard#16067

Open
ermshiperete wants to merge 1 commit into
masterfrom
fix/web/validateForCustomKeyboard
Open

fix(web): fix KeyboardStub.validateForCustomKeyboard#16067
ermshiperete wants to merge 1 commit into
masterfrom
fix/web/validateForCustomKeyboard

Conversation

@ermshiperete

Copy link
Copy Markdown
Contributor

This change fixes a misleading error message in validateForCustomKeyboard - KR is not the region as the error implies - furthermore it doesn't make sense to check KR since it is the optional keyboard registration function, so this change removes it.

Test-bot: skip

This change fixes a misleading error message in `validateForCustomKeyboard`
- `KR` is not the region as the error implies
- furthermore it doesn't make sense to check `KR` since it is the optional
  [keyboard registration function](https://help.keyman.com/developer/engine/web/18.0/reference/interface/registerKeyboard),
  so this change removes it.

Test-bot: skip
@keymanapp-test-bot

keymanapp-test-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Android
    • Keyman for Android apk - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Android apk - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Android apk (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • KeyboardHarness apk - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for Android apk (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • KMSample1 apk - build : all tests passed (no artifacts on BuildLevel "build")
    • KMSample2 apk - build : all tests passed (no artifacts on BuildLevel "build")
  • Developer
    • Keyman Developer - build : all tests passed (no artifacts on BuildLevel "build")
    • Compiler Regression Tests - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman Developer (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
  • iOS
    • Keyman for iOS (simulator image) - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for iOS (simulator image) - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for iOS (simulator image) (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for iOS (simulator image) (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
  • Keyboards
    • Test Keyboards - build : all tests passed (no artifacts on BuildLevel "build")
  • Web
    • KeymanWeb Test Home - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot Bot added this to the A19S30 milestone Jun 3, 2026
@keyman-server keyman-server modified the milestones: A19S30, A19S31 Jun 8, 2026

@mcdurdin mcdurdin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM although I hate the way this returns an Error rather than just a boolean. The error message itself undoes the good of having a super function because it includes knowledge of what the super function tests! Error message construction does not belong in the validation function IMO, but in the higher level.

What's more, this is called in just one place in keyboardRequisitioner.ts, but we have two functions, one with an Error message that is never used, just constructed and then thrown away in the subclass. We could (and should) simplify so many of these abstractions and reduce the complexity of KMW.

Weird: keyboardLoaderBase.ts has:

export type KeyboardStub = KeyboardProperties & { filename: string };

but KeyboardStub is defined in keyboardStub.ts:

export class KeyboardStub extends KeyboardProperties

And we have RawKeyboardStub vs KeyboardStub:

export interface RawKeyboardStub extends KeyboardStub {};

I don't understand why all these are necessary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants